home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
8_12.lha
/
8_12
/
8_12a1.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
550b
|
21 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ manage running out of space within the buffer
nt extrabuf::overflow(int c)
/cerr << "overflow(" << chr(c) << ") invoked, alloc=" << alloc << "\n"; // DELETE
if ((alloc ? reallocate() : allocate()) == EOF)
{ // DELETE
/cerr << "\treturning -1\n"; // DELETE
return EOF;
} // DELETE
if (c != EOF)
*pptr++ = c;
/cerr << "\treturning " << chr(c) << "\n"; // DELETE
return c & UCHAR_MAX;